﻿using System.Collections.Generic;

namespace Engine.Rule
{
    public class TraitType : AttributeType
    {
        private bool selectable;
        public bool Selectable
        {
            get { return selectable; }
            set { selectable = value; }
        }

        private uint limit;
        public uint Limit
        {
            get { return limit; }
            set { limit = value; }
        }

        public TraitType(string name, string description, bool selectable, uint limit)
            : base(name, description)
        {
            Selectable = selectable;
            Limit = limit;
        }

        public TraitType()
            : this("", "", false, 0)
        {
        }
    }

    public class Trait
    {
        private string name;
        public string Name
        {
            get { return name; }
            set { name = value; }
        }

        private string description;
        public string Description
        {
            get { return description; }
            set { description = value; }
        }

        private TraitType traitType;
        public TraitType TraitType
        {
            get { return traitType; }
            set { traitType = value; }
        }

        private Buff[] bonuses;
        public Buff[] Bonuses
        {
            get { return bonuses; }
            set { bonuses = value; }
        }

        private Buff[] penalties;
        public Buff[] Penalties
        {
            get { return penalties; }
            set { penalties = value; }
        }

        public Trait(string name, string description, TraitType traitType, Buff[] bonuses, Buff[] penalties)
        {
            Name = name;
            Description = description;
            TraitType = traitType;
            Bonuses = bonuses;
            Penalties = penalties;
        }

        public Trait()
            : this("", "", null, new Buff[0], new Buff[0])
        {
        }
    }
}
